package com.rock.platform.core;

import java.io.Serializable;
import java.sql.Connection;
import java.util.List;
import javax.persistence.EntityManager;

public abstract interface IGenericDao {
	public abstract <T, ID extends Serializable> T findByID(ID paramID,
			boolean paramBoolean, Class<T> paramClass);

	public abstract <T> List<T> findAll(Class<T> paramClass);

	public abstract <T> void add(T paramT);

	public abstract <T> T update(T paramT);

	public abstract <T> void add(T[] paramArrayOfT);

	public abstract <T> void update(T[] paramArrayOfT);

	public abstract <T> void merge(T[] paramArrayOfT);

	public abstract <T> void delete(T paramT);

	public abstract <T> void delete(T[] paramArrayOfT);

	public abstract <T, ID extends Serializable> void deleteByID(ID paramID,
			Class<T> paramClass);

	public abstract <T, ID extends Serializable> void deleteByID(
			ID[] paramArrayOfID, Class<T> paramClass);

	public abstract void flush();

	public abstract void clear();

	public abstract EntityManager getEntityManager();

	public abstract Connection getConnection();
}